package src.stateMachine;

import src.Ks;

public class State implements Statizable{

	
	public final int S_UPDATE_INPUT = 3;
	public final int S_GAME = 4;

	public static int s_StateID = 0;
	public Integer key = null; //generador de key unica cuando se crea un objeto de un estado nuevo
	
	
	
	public State(){
		key = new Integer(s_StateID++);
		
		boolean added = StateMachine.addState(this,this.key);
		
		if (added){	
			if (Ks.DBG && Ks.DBG_SM) System.out.println("DBG: " + "State " + this.toString() + "agregado a StateMachine...");
		}
		else{
			if (Ks.DBG && Ks.DBG_SM) System.out.println("DBG: " + "State " + this.toString() + "NO agregado a StateMachine...");
		}
	}
	
	public String toString(){
		return this.getClass().getName();
	}
	
	public void init() {

		
		if (Ks.DBG && Ks.DBG_SM)System.out.println("DBG: " + "clase " + this.toString()+ ": superclass State init");
	}
	public void update() {
	
		if (Ks.DBG && Ks.DBG_SM)System.out.println("DBG: " + "clase " + this.toString()+ ": superclass State update");
	}
	public void paint() {
	
		if (Ks.DBG && Ks.DBG_SM )System.out.println("DBG: " + "clase " + this.toString()+ ": superclass State paint");
	}
	public void destroy() {
	
		if (Ks.DBG && Ks.DBG_SM)System.out.println("DBG: " + "clase " + this.toString()+ ": superclass State destroy");
	}
	
}
